<html>
  <head>
    {% if title %}
    <title>{{title}} - microblog</title>
    {% else %}
    <title>microblog</title>
    {% endif %}
  </head>
  <body>
    <div>Microblog:
      <a href="{{ url_for('index')}}">Home</a>
      {% if g.user.is_authenticated %}
      | <a href="{{ url_for('user', nickname = g.user.nickname) }}">Your Profile</a>
      | <form style="display: inline;" action="{{ url_for('search') }}" method="post" name="search">{{ g.search_form.hidden_tag() }}{{ g.search_form.search(size=20) }}<input type="submit" value="Search"></form>
      | <a href="{{ url_for('logout')}}">Logout</a>
      {% endif %}
    </div>
    <!--<div>Microblog: <a href="/index">Home</a></div>-->
    <hr>
    {% with message = get_flashed_messages() %}
    {% if messages %}
    <ul>
      {% for message in messages %}
      <li>{{ message }}</li>
      {% endfor %}
    </ul>
    {% endif %}
    {% endwith %}
    {% block content %}
    {% endblock %}
  </body>
</html>